import sys
import numpy as np
import pandas as pd
import sqlite3

def to_sql(csv_file, sep):

    # with open(csv_file) as f:

    #     f.read()

    conn = sqlite3.connect('db.sqlite3')

    df = pd.read_csv(csv_file, sep = sep)

    df.to_sql(csv_file.replace('.','_'), conn)


if __name__ == '__main__':

    info = sys.argv

    print(info)

    to_sql(info[1], info[2])

